/**
 * 
 */
package bookshop.dao;

import bookshop.dao.impl.BookDaoJDBCImpl;
import bookshop.dao.impl.BrowsHistoryDaoJDBCImpl;
import bookshop.dao.impl.CategoryDaoJDBCImpl;
import bookshop.dao.impl.CustCommentDaoJDBCImpl;
import bookshop.dao.impl.CustomerDaoJDBCImpl;
import bookshop.dao.impl.ManagerDaoJDBCImpl;
import bookshop.dao.impl.OrderDaoJDBCImpl;
import bookshop.dao.impl.OrderTraceDaoJDBCImpl;
import bookshop.dao.impl.ReceiveAddrDaoJDBCImpl;
import bookshop.dao.impl.TempStoreDaoJDBCImpl;

/**
 * @author WU
 * 
 */
public class DaoFactory {
	public static Object getDao(String type) {
		if ("managerDao".equals(type)) {
			return new ManagerDaoJDBCImpl();
		}
		if ("categoryDao".equals(type)) {
			return new CategoryDaoJDBCImpl();
		}
		if ("bookDao".equals(type)) {
			return new BookDaoJDBCImpl();

		}
		if ("orderDao".equals(type)) {

			return new OrderDaoJDBCImpl();
		}
		if ("customerDao".equals(type)) {
			return new CustomerDaoJDBCImpl();
		}

		if ("receiveAddrDao".equals(type)) {

			return new ReceiveAddrDaoJDBCImpl();

		}
		
		if("orderTraceDao".equals(type)){
			return new OrderTraceDaoJDBCImpl();
			
		}
		if("tempstoreDao".equals(type)){
			
			return new TempStoreDaoJDBCImpl();
		}
		
       if("custCommentDao".equals(type)){
			
			return new CustCommentDaoJDBCImpl();
		}
       
       if("browsingHistory".equals(type)){
    	   return new BrowsHistoryDaoJDBCImpl();
    	   
       }

		return null;

	}

}
